<!-- 二维码 -->
<template>
    <div class="qrcodes">
        <div class="qrcode" v-for="(item, index) in list" :key="index">
            <img class="qrcode-image" :src="item.src" alt="qrcode" />
            <span class="qrcode-text">{{ item.text }}</span>
        </div>
    </div>
</template>

<script setup>
    defineProps({
        // 列表
        list: {
            type: Array,
            default: () => []
        }
    });
</script>

<style lang="scss" scoped>
    .qrcodes {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;

        .qrcode {
            width: 25%;
            margin-bottom: 10px;
            box-shadow: 0 0 10px 10px rgba(0,0,0,0.1);
            border-radius: 10px;
            overflow: hidden;
            padding: 5px;

            .qrcode-image {
                width: 100%;
                height: auto;
            }

            .qrcode-text {
                text-align: center;
                font-weight: 700;
                display: block;
                margin-bottom: 5px;
            }
        }
    }
</style>
